<extend name="Public/layout"/>
<block name="head">
<link rel="stylesheet" href="__PUBLIC__css/master.css">
<style type="text/css">
.footer{
  display: none;
}
</style>
</block>
    
   <block name="main">
      <div class="chat-list">
        <ul>
        <foreach name="r" item="v">
            <li>
              <div class="chat-item clearfix ">
                <div class="chat-left">
                  <div class="chat-icon">
                    <img src="{$v.user.url_img}">
                  </div>
                  
                </div>
                <div class="chat-right">
                  <h4>{$v.user.nickname}</h4>
                  <!-- <p>投哪网徒弟</p> -->
                </div>
                <a  class="more" attr="{$v.recommend_id}" attr_user="{$v.user.id}" href="javascript:">
                  <img src="__PUBLIC__images/mmore.png" height="48" width="48">
                </a>
              </div>
            </li>
           </foreach>
          </ul>      
      </div>
<!--       <div class="more-con">
        <div class="con">
          <div class="title">
            <p>投哪网师父</p>
          </div>
          <div class="cancel">
            <img src="__PUBLIC__images/quxiao.png">
            <p>取消拜师</p>
          </div>
          <a href="#" class="sixin">
            <img src="__PUBLIC__images/sixin.png">
            <p>私信</p>
          </a>
          
        </div>
      </div> -->
        </block>
    <block name="js">

      <script type="text/javascript">
     
      $('.more').click(function(){
        var uid = $(this).attr('attr')
        var user_id = $(this).attr('attr_user')
         var temp = '<div class="title">'
            +'<p>8号街师父</p>'
          +'</div>'
          +'<div class="cancel" onclick="no_fllow('+uid+')">'
            +'<img src="__PUBLIC__images/quxiao.png">'
           +' <p>取消拜师</p>'
          +'</div>'
          +'<a href="/Home/Im/talk/id/'+user_id+'" class="sixin">'
            +'<img src="__PUBLIC__images/sixin.png">'
            +'<p>私信</p>'
          +'</a>';
        layer.open({
          content: temp
          ,skin: 'footer'
        });
      })

      function no_fllow(uid){
        $.post('/Home/Recommend/recommend_fllow',{
            recommend_id:uid,
            val:0
        },function(res){
             layer.open({
              content: res.msg
              ,skin: 'msg'
              ,time: 1
              ,end:function(){location.reload()}
              });
        })
      }
      </script>
</block>